/*!
\file
	MethodInfo.cpp
\brief
	Definition of MethodInfo.
\author
	Copyright (C) 2008 Vadym Hulakov, mailto:hulakov@gmail.com.
	All rights reserved.
*/

#include "Method.h"
//#include "DataTypesManager.h"
//#include "UncompleteDataTypeInfo.h"
//#include "Helpers.h"
//#include <sstream>

namespace ObjectModel
{
	Method::Method(const wchar_t* name,	const Type& returnType, bool isPure,
		ClassMemberAccess access, const wchar_t* description)
		: _returnType(&returnType), _access(access)
		, ItemBase(name, description)
		, _isPure(isPure)
	{
	}

	Parameter& Method::addParameter(const wchar_t* name/* = L""*/, Type& type,
		ClassMemberAccess access/* = ClassMemberAccessPrivate*/,
		const wchar_t* description/* = 0*/)
	{
		Parameter* parameter = new Parameter(name, type, access, description);
		_parameters.push_back(*parameter);
		return *parameter;
	}
}
